import java.util.Arrays;

public class Test03Arrays {

  public static void main(String[] args) {
    // 数组工具类
    int[] arr = { 1, 4, 3, 2, 8, 10 };
    // System.out.println("arr:" + arr);
    System.out.println("arr:" + Arrays.toString(arr));
    Arrays.sort(arr);
    Arrays.fill(arr, 10);
    int index = Arrays.binarySearch(arr, 20);
    int newArr[] = Arrays.copyOfRange(arr, 1, 10);
    System.out.println("newArr:" + Arrays.toString(newArr));
    System.out.println("index:" + index);
    System.out.println("arr:" + Arrays.toString(arr));
    // System.out.println("arr.length:" + arr.length);
    // System.out.println("arr:" + arr);
    // int arr2[] = Arrays.copyOf(arr, 10);
    // System.out.println("arr:" + Arrays.toString(arr));
    // System.out.println("arr2:" + Arrays.toString(arr2));

    // System.out.println(Arrays.toString(arr));
    // System.out.println("arr.length:" + arr.length);
    // System.out.println("arr:" + arr);
  }
}